package com.tzt.common;

import com.tzt.service.ShopUserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * 项目启动执行
 * @author Double
 */
@Component
@Order(value=1)
public class FtpInitRunner implements CommandLineRunner
{
    private final Logger logger = LoggerFactory.getLogger(this.getClass());

    @Autowired
    private ShopUserService shopUserService;

    /**
     * 项目启动后运行此方法
     */
    @Override
    public  void run(String... var1){
        try{
            String result = shopUserService.refreshCache();
            logger.info("项目启动后运行刷新缓存"+result);
        }catch (Exception e){

        }

    }
}
